//
//  HGTextCollectionViewCell.m
//  悦享
//
//  Created by dllo on 16/3/19.
//  Copyright © 2016年 张洪国. All rights reserved.
//

#import "HGTextCollectionViewCell.h"

@implementation HGTextCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.button = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:_button];
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes{
    _button.frame = CGRectMake((SREEN_WIDTH - 200) / 2, 10, 200, 30);
    [_button setTitle:[NSString stringWithFormat:@"查看更多 >>"] forState:UIControlStateNormal];
    [_button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    [_button setTitleColor:[UIColor colorWithRed:0.88 green:0.4 blue:0 alpha:1] forState:UIControlStateNormal];
}
- (void)buttonAction:(UIButton *)button{
    NSLog(@"查看更多");
    
}
@end
